/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package metrothemetro;

/**
 *
 * @author x
 */
public class Station {
    public Station(){
        this.name="Unknown";
        this.id=Station.generateNewID();
    }

    public Station(String name){
        this.id=Station.generateNewID();
        this.name=name;
    }

    public void setName(String name){
        this.name=name;
    }

    public String getName(){
        return this.name;
    }

    public int getID(){
        return this.id;
    }

    @Override
    public String toString(){
        return "Station" +
                "\n\tName: "+this.name+
                "\n\tID: "+this.id;
    }

    private static int generateNewID(){
        return Station.CURRENT_ID++;
    }

    private String name;

    private int id;
    private static int CURRENT_ID=0;
}
